package pl.myapp.webtest.prime;

import org.slf4j.Logger;
import pl.myapp.webtest.config.qualifier.MyLogger;
import pl.myapp.webtest.events.stuff.CupOfCoffee;

import javax.enterprise.context.RequestScoped;
import javax.faces.bean.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: kaafaar
 * Date: 16.05.11
 * Time: 23:42
 * To change this template use File | Settings | File Templates.
 */
@Named
@ViewScoped
public class PrimeDemo implements Serializable {
    @Inject
	@MyLogger
    Logger logger;

    List<CupOfCoffee> cupOfCoffeeList;

    CupOfCoffee selected;

    {
        cupOfCoffeeList = new ArrayList<CupOfCoffee>();
    }

    public void generateData() {
        cupOfCoffeeList.add(new CupOfCoffee("some black coffee name", 0.99f));
        cupOfCoffeeList.add(new CupOfCoffee("some white coffee name", 0.99f));
    }

    public void cupOfCoffee() {
        logger.info("some cup of coffee");
    }
    /**
     * GET SET
     *
     */
    public List<CupOfCoffee> getCupOfCoffeeList() {
        return cupOfCoffeeList;
    }

    public void setCupOfCoffeeList(List<CupOfCoffee> cupOfCoffeeList) {
        this.cupOfCoffeeList = cupOfCoffeeList;
    }

    public CupOfCoffee getSelected() {
        return selected;
    }

    public void setSelected(CupOfCoffee selected) {
        this.selected = selected;
    }
}
